package ui;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.SystemColor;
import java.text.SimpleDateFormat;
import java.util.Locale;

import javax.swing.border.Border;
import javax.swing.border.CompoundBorder;
import javax.swing.border.EmptyBorder;
import javax.swing.border.EtchedBorder;

/**
 * The interface that contains standardized graphical and font options for
 * the graphical user interface.  Use of these standards is highly
 * encouraged, to make the program look and feel the same throughout.
 * 
 * @author Aaron Chen
 * @version 3/4/2014
 */
public interface Standards {
  
  /** The columns hint for half of a form for components. */
  int TEXT_BOX_HALF_WIDTH = 20;
  
  /** The rows hint for medium-sized text areas. */
  int TEXT_AREA_MEDIUM_ROWS = 5;
  /** The rows hint for large-sized text areas. */
  int TEXT_AREA_LARGE_ROWS = 10;
  
  /** The maximum number of radio buttons in a form button group. */
  int RATING_MAX_SELECTION = 5;

  /** The length of an invisible strut component. */
  int STRUT_LENGTH_MEDIUM = 5;
  /** The length of an invisible strut component. */
  int STRUT_LENGTH_LARGE = 10;
  
  /** The amount that the scroll bar will scroll. */
  int SCROLL_BAR_INCREMENT = 16;

  /** The name of the standard font for most font standards. */
  String STANDARD_FONT_NAME = "Arial";
  
  /** The font for standard text and labels. */
  Font FONT_STANDARD = new Font(STANDARD_FONT_NAME, Font.PLAIN, 11);
  /** The font for standard bold text and labels. */
  Font FONT_BOLD = new Font(STANDARD_FONT_NAME, Font.BOLD, 11);
  /** The font for title text and labels. */
  Font FONT_TITLE = new Font(STANDARD_FONT_NAME, Font.PLAIN, 24);
  /** The font for section title text and labels. */
  Font FONT_MEDIUM = new Font(STANDARD_FONT_NAME, Font.BOLD, 16);
  
  /** The background color for special panels and windows. */
  Color COLOR_BACKGROUND = SystemColor.activeCaption;
  /** The color of the even number rows of tables from a user perspective. */
  Color COLOR_TABLE_EVEN_ROW = new Color(200, 200, 255);
  /** The color of the odd number rows of tables from a user perspective. */
  Color COLOR_TABLE_ODD_ROW = new Color(240, 240, 240);
  /** The color of table header. */
  Color COLOR_TABLE_HEADER = new Color(160, 160, 235);
  
  /** The border that serves as a space buffer around panels and components. */
  Border BORDER_EMPTY = new EmptyBorder(5, 5, 5, 5);  //up, left, down, right
  /** The border used for small special panels and windows. */
  Border BORDER_STANDARD = new EtchedBorder(EtchedBorder.LOWERED, null, null);
  /** The border used for large special panels and windows. */
  Border BORDER_COMPOUND_FORM =
      new CompoundBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null),
                         BORDER_EMPTY);
  
  /** The language that the application uses.  Change this to config.txt? */
  Locale LOCALE = Locale.ENGLISH;
  
  /** The date formatter used to convert dates into strings and vice versa. */
  SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("MM/dd/yyyy", Locale.ENGLISH);
  
  //TODO move this to a config.txt line.
  /** The directory path where the database is found. */
  String DATABASE_PATH = "database/";
  
  /** The dimension of a "..." type selection button. */
  Dimension DIMENSION_SELECT_BUTTON = new Dimension(20, 15);
  
  /** The Role ID of the Program Chair. */
  int ROLE_ID_PROGRAM_CHAIR = 1;
  /** The Role ID of the Subprogram Chair. */
  int ROLE_ID_SUBPROGRAM_CHAIR = 2;
  /** The Role ID of the Author. */
  int ROLE_ID_AUTHOR = 3;
  /** The Role ID of the Reviewer. */
  int ROLE_ID_REVIEWER = 4;
  
}
